<?php
session_start();
if(!session_is_registered(user)){
header("location:index.php");
}else{header("location:main_login.php");}
?>
<a href="logout.php">logout</a>